package com.fgba.express.data.mapstruct;

import com.fgba.express.core.mapstruct.BaseStruct;
import com.fgba.express.data.entity.User;
import com.fgba.express.data.dto.UserDto;
import com.fgba.express.data.search.UserSearch;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.NullValuePropertyMappingStrategy;

/**
 * 快递员实体和快递员Model之间的对象转换
 */
@Mapper(componentModel = "spring", nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface UserStruct extends BaseStruct<User, UserDto, UserSearch> {
    @Override
    User entityConvertDto(UserDto dto);

    @Override
    UserDto dtoConvertEntity(User entity);
}
